projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4df66f6
)
base: fix half reference conversion expecting zeroed target
author
Øyvind Kolås
<pippin@gimp.org>
Sat, 16 Jan 2016 10:16:22 +0000
(11:16 +0100)
committer
Øyvind Kolås
<pippin@gimp.org>
Sat, 16 Jan 2016 10:16:22 +0000
(11:16 +0100)
As discovered in bug #760703 the reference path is currently expecting
zeroed memory, fix by explicitly zeroing last 32bit of mantissa.
babl/base/type-half.c
patch
|
blob
|
history
diff --git
a/babl/base/type-half.c
b/babl/base/type-half.c
index e45e34ad67a040774f8bcec3e9f18425fd2b8724..57b5d7dce239beb4cb7b56322f6e252616f1cb18 100644
(file)
--- a/
babl/base/type-half.c
+++ b/
babl/base/type-half.c
@@
-283,7
+283,7
@@
static void halfp2doubles(void *target, void *source, long numel)
*xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits
}
}
-
xp++; // Skip over
the remaining 32 bits of the mantissa
+
*xp++ = 0; // Skip over and zero
the remaining 32 bits of the mantissa
}
}